package cn.hellochaos.generator.service;

import cn.hellochaos.generator.entity.CaipuBuzhou;
import cn.hellochaos.generator.entity.CaipuFuliao;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
* <p>
* 辅料 服务类
* </p>
*
* @author test
* @since 2021-01-23
*/
public interface CaipuFuliaoService {


    /**
     * 根据id查询CaipuBuzhou
     *
     * @param id 需要查询的CaipuBuzhou的id
     * @return 返回对应id的CaipuBuzhou对象
     * @author test
     * @since 2021-01-23
     */
    List<CaipuFuliao> getCaipuBuzhouByCookBookId(int cookbookId);

    /**
    * 分页查询CaipuFuliao
    *
    * @param page     当前页数
    * @param pageSize 页的大小
    * @param factor  搜索关键词
    * @return 返回mybatis-plus的Page对象,其中records字段为符合条件的查询结果
    * @author test
    * @since 2021-01-23
    */
    Page<CaipuFuliao> listCaipuFuliaosByPage(int page, int pageSize, String factor);

    /**
    * 根据id查询CaipuFuliao
    *
    * @param id 需要查询的CaipuFuliao的id
    * @return 返回对应id的CaipuFuliao对象
    * @author test
    * @since 2021-01-23
    */
    CaipuFuliao getCaipuFuliaoById(int id);

    /**
    * 插入CaipuFuliao
    *
    * @param caipuFuliao 需要插入的CaipuFuliao对象
    * @return 返回插入成功之后CaipuFuliao对象的id
    * @author test
    * @since 2021-01-23
    */
    int insertCaipuFuliao(CaipuFuliao caipuFuliao);

    /**
    * 根据id删除CaipuFuliao
    *
    * @param id 需要删除的CaipuFuliao对象的id
    * @return 返回被删除的CaipuFuliao对象的id
    * @author test
    * @since 2021-01-23
    */
    int deleteCaipuFuliaoById(int id);

    /**
    * 根据id更新CaipuFuliao
    *
    * @param caipuFuliao 需要更新的CaipuFuliao对象
    * @return 返回被更新的CaipuFuliao对象的id
    * @author test
    * @since 2021-01-23
    */
    int updateCaipuFuliao(CaipuFuliao caipuFuliao);

}
